package com.kimstore.dao;

import com.kimstore.utilities.QueryElements;
import java.io.Serializable;
import java.util.List;

public interface GenericJpaDao<T, Id extends Serializable> {

    T findById(Id id);

    List<T> findAll();

    List<T> findByExample(T exampleInstance);

    void batchInsert(List<T> entityList);

    void saveOrUpdate(T entity);

    void delete(T entity);

    void deleteAll();
    
    List<T> filter(QueryElements queryElements, long startIndex, long numberOfItems);

    long count(QueryElements queryElements);
}
